﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageDeal.Master" Theme="MainTheme" AutoEventWireup="true" CodeBehind="DealDetails.aspx.cs" Inherits="_5ChickDeal.DealDetails" %>

<%@ Register src="UserControl/MainContent.ascx" tagname="MainContent" tagprefix="uc1" %>



<asp:Content ContentPlaceHolderID="head" runat="server">
    <title>Thử nghiệm</title>
    <script type="text/javascript" src="Js/js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript">
        function fm(bien) {
           
            if (bien.toString().length < 2) {
                return "0" + bien;
            }
            else {
                return bien;
            }
        
        }
        $(function() {
            var gio = $("#gio").html();
            var phut = $("#phut").html();
            var giay = $("#giay").html();

            if (gio != "") {
                var idintervar = window.setInterval(function() {
                    giay = giay - 1;
                    if (giay == -1) {
                        giay = 59;
                        phut = phut - 1;
                        if (phut == -1) {

                            phut = 59;
                            gio = gio - 1;
                            if (gio == -1) {

                                window.clearInterval(idintervar);
                            }
                            $("#gio").html(fm(gio));

                        }
                        $("#phut").html(fm(phut));
                    }
                    $("#giay").html(fm(giay));
                }, 1000);
            }
        });
    
    </script>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">

    <uc1:MainContent ID="MainContent1" runat="server" />

</asp:Content>